'use strict';

function compare_collections(collection_a, collection_b) {
  let sum;
  if(collection_a.length!=collection_b.length)
    return false;
  else
    {
      collection_a.sort();
      collection_b.sort();
      for(let i=0;i<collection_a.length;i++)
        {
          if(collection_a[i]==collection_b[i])
            sum+=1;
        }
      if(sum=collection_a.length)
        return true;
    }
}

module.exports = compare_collections;


